home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / m68k / 469 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.2 KB  |  66 lines

  1. Newsgroups: comp.sys.m68k
  2. Path: netcom.com!ludis
  3. From: ludis@netcom.com (Ludis Langens)
  4. Subject: Re: [?] Wait state generator - 68k
  5. Message-ID: <ludisDovGqI.412@netcom.com>
  6. Organization: It's here somewhere
  7. References: <4j5hc2$roc@pulp.ucs.ualberta.ca> <4j7j56$ffc@pulp.ucs.ualberta.ca>
  8. Date: Tue, 26 Mar 1996 11:18:18 GMT
  9. Sender: ludis@netcom11.netcom.com
  10.  
  11. In article <4j7j56$ffc@pulp.ucs.ualberta.ca> jdv@ee.ualberta.ca (John Voth) writes:
  12. >>>I have a device that asserts "ready" - a signal used on Intel mpu's such
  13. >>>as the 8086. Well, I am trying to interface this chip to the mc68k and
  14. >>>as many of you out there know already, the mc68k hasn't got this
  15. >>>"feature" built into it.
  16. >
  17. >>Use the 'READY' line to hold off the '/DTACK' signal to the 68K. This will 
  18. >>automatically insert wait states when req'd. If 'READY' is active high then 
  19. >>the invert this line to create '/DTACK'. BUT do remember that /DTACK is a 
  20. >>wired OR signal to the 68K.
  21. >
  22. >Looking in the Motorola databooks, the waveforms for asynchronous bus
  23. >cycles show that DTACK and AS are de-asserted at the same time. I would
  24. >like to know which one has to or needs to be de-asserted before the
  25. >other. That is to ask, which one is de-asserted first? 
  26.  
  27. AS is an output, DTACK is an input.  Once AS deasserts, it is expected
  28. that your device will release DTACK so as not to interfere with the
  29. next access.
  30.  
  31. >Another question, if the mc68k continuously monitors the DTACK line
  32. >- waiting for it to be asserted then does the mc68k wait until it is
  33. >de-asserted before ending the bus cycle? Or does the mc68k end the bus
  34. >cycle immediately after receiving the DTACK signal?  
  35.  
  36. The 68k polls the DTACK line once per clock cycle.  Upon finding it
  37. asserted, it will allow the bus cycle to continue to its end.  This
  38. takes about another full clock cycle or so before everything is done.
  39. If you assert DTACK at the correct part of the clock cycle, you can
  40. actually deassert it before the bus cycle is done.
  41.  
  42. >I am wondering if I can simply hold the DTACK asserted until I want to
  43. >let it go ( presumeably that's when I want to stop adding wait states )
  44. >then allow the mc68k end the bus cycle?
  45. >
  46. >At the moment, I am creating a state machine inside a EP-610 PLD that
  47. >will sense AS and READY. It will generate a DTACK signal ( duration =
  48. >1,2 or 3 clock cycles long ) upon sensing a positive transistion of the
  49. >READY signal. It's alot of work just to create DTACK so, if there are
  50. >any short cuts that I can take, I would like to find them soon. Thus all
  51. >the questions the DTACK and AS signal timing.
  52.  
  53. No, no, no!  DTACK is not a WAIT signal as found in some Intel CPUs.
  54. In fact, it sounds like the READY signal from your device _is_ a
  55. DTACK (except of the wrong polarity).
  56.  
  57. You should be able to get by with just a single open-collector gate and
  58. an inverter.  One input is the READY signal from your device.  The other
  59. is the *CS of your device.  Configure the gate to assert DTACK only
  60. when your device signals READY and your CS logic has your device selected.
  61.  
  62. -- 
  63.                    unsigned long BinToBCD(unsigned long i) {unsigned long t;
  64. Ludis Langens         return i ? (t = BinToBCD(i >> 1), (t << 1) + (i & 1) + 
  65. ludis@netcom.com                 (t + 858993459 >> 2 & 572662306) * 3) : 0;}
  66.